home *** CD-ROM | disk | FTP | other *** search
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/cross-util/Changelog,v
- retrieving revision 1.37
- diff -c -r1.37 Changelog
- *** 1.37 1993/03/29 03:40:52
- --- Changelog 1993/05/21 15:27:29
- ***************
- *** 458,460 ****
- --- 458,487 ----
- all the cygnus changes.
-
- ----------------------------- Patchlevel 35 --------------------------------
- +
- + Makefile.cross:: michal
- + added important note for NeXT users.
- +
- + ************* NeXT users take note *****************
- +
- +
- + ar.c nm.c size.c size68.c:: michal
- + There were also various instances of
- + "#include /usr/include/something.h"
- + I changed them to <something.h> and rely on include path.
- +
- + size68.c:: michal
- + sync up with various recent changes to util.
- +
- + toglclr.c:: frank
- + Added code to handle the memory protection bits under MultiTOS.
- + Changed output format slightly.
- +
- + size68.c:: frank
- + change output format to include any MiNT memory prots.
- + merged with michals chenages from above. ++jrb
- +
- + fixstk.c, printstk.c:: ++jrb
- + cleanup
- +
- + ----------------------------- Patchlevel 36 --------------------------------
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/cross-util/Makefile.cross,v
- retrieving revision 1.14
- diff -c -r1.14 Makefile.cross
- *** 1.14 1992/10/11 02:39:24
- --- Makefile.cross 1993/05/21 15:22:59
- ***************
- *** 10,15 ****
- --- 10,30 ----
- # byte sex to a m68k, ie a little endian host, the add -DBYTE_SWAP to CFLAGS.
- #
- #
- + # ************** IMPORTANT note for NeXT with OS 3.0 or higher **********
- + #
- + # Cross-compiling on NeXT with OS 3.0 and higher:
- + # ----------------------------------------------
- + # For this host define, in Makefile.cross,
- + #
- + # HOSTINC = /usr/include/ansi -I/usr/include/bsd
- + #
- + # making search path for include files into "-I. -I$(HOSTINC) -I$(CROSSINC)".
- + # Also, because file /usr/include/bsd/stab.h does exist and we need
- + # another one, provide a link from CROSSINC/stab.h to stab.h in the current
- + # directory so ST version will be picked up first.
- + #
- + # ************************************************************************
- +
- CROSSDIR = /net/acae127/home/bammi/atari/cross-gcc
- CROSSBIN = $(CROSSDIR)/bin
- CROSSLIB = $(CROSSDIR)/lib
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/cross-util/PatchLev.h,v
- retrieving revision 1.32
- diff -c -r1.32 PatchLev.h
- *** 1.32 1993/03/29 03:40:54
- --- PatchLev.h 1993/05/21 15:23:00
- ***************
- *** 1,4 ****
- ! #define PatchLevel "35"
-
- /*
- * the Patch Level above is to identify the version
- --- 1,4 ----
- ! #define PatchLevel "36"
-
- /*
- * the Patch Level above is to identify the version
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/cross-util/ar.c,v
- retrieving revision 1.20
- diff -c -r1.20 ar.c
- *** 1.20 1992/07/21 14:52:06
- --- ar.c 1993/05/21 15:23:04
- ***************
- *** 106,120 ****
- #define bzero(a,b) memset (a,0,b)
- #define bcmp(a,b,c) memcmp (a,b,c)
- #endif
- ! #include "/usr/include/stdio.h"
- /* #include "ar.h" */
- #include "gnu-ar.h"
- #include "gnu-out.h"
- ! #include "/usr/include/errno.h"
- ! #include "/usr/include/sys/file.h"
- ! #include "/usr/include/sys/time.h"
- ! #include "/usr/include/sys/types.h"
- ! #include "/usr/include/sys/stat.h"
- #else
- #ifdef atarist
- #include <stdio.h>
- --- 106,121 ----
- #define bzero(a,b) memset (a,0,b)
- #define bcmp(a,b,c) memcmp (a,b,c)
- #endif
- !
- ! #include <stdio.h>
- /* #include "ar.h" */
- #include "gnu-ar.h"
- #include "gnu-out.h"
- ! #include <errno.h>
- ! #include <sys/file.h>
- ! #include <sys/time.h>
- ! #include <sys/types.h>
- ! #include <sys/stat.h>
- #else
- #ifdef atarist
- #include <stdio.h>
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/cross-util/fixstk.c,v
- retrieving revision 1.7
- diff -c -r1.7 fixstk.c
- *** 1.7 1993/03/29 03:40:59
- --- fixstk.c 1993/05/21 15:23:06
- ***************
- *** 34,39 ****
- --- 34,42 ----
-
- #ifdef WORD_ALIGNED
- # define SIZEOF_AEXEC ((2*sizeof(short)) + (6*sizeof(long)))
- + # ifndef SYMLEN
- + # define SYMLEN 8
- + # endif
- # define SIZEOF_ASYM ((SYMLEN*sizeof(char)) + sizeof(short) + sizeof(long))
- # define SYM_OFFSET (sizeof(short) + (3*sizeof(long)))
- #endif
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/cross-util/nm.c,v
- retrieving revision 1.11
- diff -c -r1.11 nm.c
- *** 1.11 1993/03/29 03:41:06
- --- nm.c 1993/05/21 15:23:12
- ***************
- *** 109,121 ****
-
- #ifdef CROSSATARI
- #include "stab.h"
- ! #include "/usr/include/stdio.h"
- #ifdef USG
- #include "/usr/include/string.h"
- #include "/usr/include/fcntl.h"
- #include "/usr/include/sys/types.h"
- #else
- ! #include "/usr/include/strings.h"
- #endif
- #include "gnu-ar.h"
- #else
- --- 109,121 ----
-
- #ifdef CROSSATARI
- #include "stab.h"
- ! #include <stdio.h>
- #ifdef USG
- #include "/usr/include/string.h"
- #include "/usr/include/fcntl.h"
- #include "/usr/include/sys/types.h"
- #else
- ! #include <strings.h>
- #endif
- #include "gnu-ar.h"
- #else
- ***************
- *** 129,135 ****
- #include <file.h>
- #else
- #ifdef CROSSATARI
- ! #include "/usr/include/sys/file.h"
- #else
- #ifdef atariminix
- #if 0
- --- 129,136 ----
- #include <file.h>
- #else
- #ifdef CROSSATARI
- !
- ! #include <sys/file.h>
- #else
- #ifdef atariminix
- #if 0
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/cross-util/printstk.c,v
- retrieving revision 1.7
- diff -c -r1.7 printstk.c
- *** 1.7 1993/03/29 03:41:07
- --- printstk.c 1993/05/21 15:23:14
- ***************
- *** 29,34 ****
- --- 29,37 ----
-
- #ifdef WORD_ALIGNED
- # define SIZEOF_AEXEC ((2*sizeof(short)) + (6*sizeof(long)))
- + # ifndef SYMLEN
- + # define SYMLEN 8
- + # endif
- # define SIZEOF_ASYM ((SYMLEN*sizeof(char)) + sizeof(short) + sizeof(long))
- # define SYM_OFFSET (sizeof(short) + (3*sizeof(long)))
- #endif
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/cross-util/size.c,v
- retrieving revision 1.3
- diff -c -r1.3 size.c
- *** 1.3 1991/04/12 18:22:25
- --- size.c 1993/05/21 15:23:16
- ***************
- *** 104,113 ****
- #ifdef CROSSATARI
- #include "gnu-out.h"
- #include "st-out.h"
- ! #include "/usr/include/stdio.h"
- ! #include "/usr/include/strings.h"
- #include "gnu-ar.h"
- ! #include "/usr/include/sys/file.h"
- #else
- #include <gnu-out.h>
- #include <st-out.h>
- --- 104,113 ----
- #ifdef CROSSATARI
- #include "gnu-out.h"
- #include "st-out.h"
- ! #include <stdio.h>
- ! #include <strings.h>
- #include "gnu-ar.h"
- ! #include <sys/file.h>
- #else
- #include <gnu-out.h>
- #include <st-out.h>
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/cross-util/size68.c,v
- retrieving revision 1.7
- diff -c -r1.7 size68.c
- *** 1.7 1993/03/29 03:41:09
- --- size68.c 1993/05/21 15:23:17
- ***************
- *** 1,21 ****
- #include <stdio.h>
-
- /*
- ! * Header prepended to each Atari ST .prg file
- */
- ! struct aexec {
- ! short a_magic; /* magic number */
- ! unsigned long a_text; /* size of text segment */
- ! unsigned long a_data; /* size of initialized data */
- ! unsigned long a_bss; /* size of uninitialized data */
- ! unsigned long a_syms; /* size of symbol table */
- ! unsigned long a_AZero1; /* always zero */
- ! unsigned long a_AZero2; /* always zero */
- ! unsigned short a_isreloc; /* is reloc info present */
- ! };
- ! #define CMAGIC 0x601A /* contiguous text */
- ! #define ISRELOCINFO 0 /* relocation information is present */
- ! /* any other value - no reloc info */
-
- extern FILE *fopen();
-
- --- 1,33 ----
- + /* -*- Mode: Elec-C -*-
- + * size68.c -- report segment sizes take from program header
- + *
- + * Author : probably J.R.Bammi
- + * Created On : some years ago
- + * Last Modified By: Frank Ridderbusch
- + * Last Modified On: Wed Apr 14 21:22:02 1993
- + * Update Count : 6
- + * Status : Unknown, Use with caution!
- + */
- +
- + /* HISTORY
- + * 14-Apr-1993 Frank Ridderbusch
- + * Deleted the prgflags structure in this file, since it is in
- + * <st-out.h>. Added code to report status on all prgflags defined
- + * upto now.
- + */
- +
- #include <stdio.h>
- + #include <st-out.h>
-
- /*
- ! * ldflgs - stolen from MiNT mem.h
- */
- !
- ! #define F_PROTMODE 0xf0 /* protection mode bits */
- ! #define F_PROT_P 0x00 /* no read or write */
- ! #define F_PROT_G 0x10 /* any access OK */
- ! #define F_PROT_S 0x20 /* any super access OK */
- ! #define F_PROT_PR 0x30 /* any read OK, no write */
-
- extern FILE *fopen();
-
- ***************
- *** 56,66 ****
- exit(3);
- }
- printf("%s:\n\ttext size\t%ld\n\tdata size\t%ld\n\tbss size\t%ld\
- ! \n\tsymbol size\t%ld\n\tFile %s relocatable\n\
- ! \t%s cleared on startup\n\n", name, h.a_text,
- h.a_data, h.a_bss, h.a_syms,
- ! (h.a_isreloc == ISRELOCINFO)? "is":"is not",
- ! (h.a_AZero2 & 1)? "Only BSS" : "BSS and high mem");
- }
-
- # ifdef WORD_ALIGNED
- --- 68,86 ----
- exit(3);
- }
- printf("%s:\n\ttext size\t%ld\n\tdata size\t%ld\n\tbss size\t%ld\
- ! \n\tsymbol size\t%ld\n\tFile %s relocatable.\n\
- ! \t%s cleared on startup.\n", name, h.a_text,
- h.a_data, h.a_bss, h.a_syms,
- ! (h.a_isreloc == ISRELOCINFO) ? "is" : "is not",
- ! (h.a_AZero2 & F_FASTLOAD) ? "Only BSS" : "BSS and high mem");
- ! printf("\tFile is loaded into %s\n",
- ! (h.a_AZero2 & F_ALTLOAD) ? "alternate ram" : "ST ram");
- ! printf("\t and allocates memory from %s.\n",
- ! (h.a_AZero2 & F_ALTALLOC) ? "alternate ram" : "ST ram");
- ! printf("\tFile runs with `%s' memory protection (under MultiTOS).\n",
- ! (((h.a_AZero2 & F_PROTMODE) == F_PROT_PR) ? "readable" :
- ! (((h.a_AZero2 & F_PROTMODE) == F_PROT_S) ? "super" :
- ! (((h.a_AZero2 & F_PROTMODE) == F_PROT_G) ? "global" : "private"))));
- }
-
- # ifdef WORD_ALIGNED
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/cross-util/strip.c,v
- retrieving revision 1.8
- diff -c -r1.8 strip.c
- *** 1.8 1993/03/29 03:41:10
- --- strip.c 1993/05/21 15:23:19
- ***************
- *** 31,38 ****
- */
-
- #include <stdio.h>
- - #include <stat.h>
- #ifdef atarist
- #ifdef __GNUC__
- # include <stddef.h>
- # include <memory.h>
- --- 31,38 ----
- */
-
- #include <stdio.h>
- #ifdef atarist
- + #include <stat.h>
- #ifdef __GNUC__
- # include <stddef.h>
- # include <memory.h>
- ***************
- *** 46,51 ****
- --- 46,52 ----
- #endif
-
- #ifdef unix
- + # include <sys/stat.h>
- # include <strings.h>
- # define lwrite write
- # define lread read
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/cross-util/toglclr.c,v
- retrieving revision 1.4
- diff -c -r1.4 toglclr.c
- *** 1.4 1992/11/08 00:29:27
- --- toglclr.c 1993/05/21 15:23:21
- ***************
- *** 5,35 ****
- *
- * Author : J.R. Bammi, modified by F. Ridderbusch
- * Created On : Some time ago.
- ! * Last Modified By: J.R. Bammi
- ! * Last Modified On: Fri Sep 25 12:00:28 1992
- ! * Update Count : 6
- * Status : Unknown, Use with caution!
- */
-
- /* HISTORY
- * 25-Sep-1992 ++jrb
- * Added support for cross-environment with support for
- * WORD_ALIGNED hosts.
- - *
- * 13-Sep-1992 Frank Ridderbusch
- * This program was originally written by J.R. Bammi
- * (bammi@cadence.com) to toggle the clear TPA above BSS flag
- * introduced with TOS 1.4. I extended it to also handle the additional
- * program flags introduced with the TOS versions for the STE and TT.
- - *
- - * 31-Oct-1992 Thomas Schulze
- - * Added code for MiNT 0.96 (and up) shared text feature. -fshare
- - * will switch this flag.
- */
-
- #include <stdio.h>
- #include <stdlib.h>
- ! #include <unixlib.h>
- #include <string.h>
- #include <st-out.h>
-
- --- 5,36 ----
- *
- * Author : J.R. Bammi, modified by F. Ridderbusch
- * Created On : Some time ago.
- ! * Last Modified By: Frank Ridderbusch
- ! * Last Modified On: Wed Apr 14 21:26:12 1993
- ! * Update Count : 18
- * Status : Unknown, Use with caution!
- */
-
- /* HISTORY
- + * 14-Apr-1993 Frank Ridderbusch
- + * Added code to handle the memory protection bits under MultiTOS.
- + * Changed output format slightly.
- + * 31-Oct-1992 Thomas Schulze
- + * Added code for MiNT 0.96 (and up) shared text feature. -fshared
- + * will switch this flag.
- * 25-Sep-1992 ++jrb
- * Added support for cross-environment with support for
- * WORD_ALIGNED hosts.
- * 13-Sep-1992 Frank Ridderbusch
- * This program was originally written by J.R. Bammi
- * (bammi@cadence.com) to toggle the clear TPA above BSS flag
- * introduced with TOS 1.4. I extended it to also handle the additional
- * program flags introduced with the TOS versions for the STE and TT.
- */
-
- #include <stdio.h>
- #include <stdlib.h>
- ! #include <unistd.h>
- #include <string.h>
- #include <st-out.h>
-
- ***************
- *** 37,43 ****
- --- 38,55 ----
- #define FILENAME_MAX 1024
- #endif
-
- + /*
- + * ldflgs - stolen from MiNT mem.h
- + */
- +
- + #define F_PROTMODE 0xf0 /* protection mode bits */
- + #define F_PROT_P 0x00 /* no read or write */
- + #define F_PROT_G 0x10 /* any access OK */
- + #define F_PROT_S 0x20 /* any super access OK */
- + #define F_PROT_PR 0x30 /* any read OK, no write */
- +
- int flags_to_toggle = 0;
- + int set_mp_flags = 0;
-
- #ifdef WORD_ALIGNED
-
- ***************
- *** 130,137 ****
- }
-
- t = head.a_AZero2;
- ! if (flags_to_toggle)
- {
- head.a_AZero2 ^= flags_to_toggle;
- lseek(fd, 0L, SEEK_SET);
- if(writehead(&head, fd))
- --- 142,150 ----
- }
-
- t = head.a_AZero2;
- ! if (flags_to_toggle || set_mp_flags)
- {
- + head.a_AZero2 &= ~F_PROTMODE;
- head.a_AZero2 ^= flags_to_toggle;
- lseek(fd, 0L, SEEK_SET);
- if(writehead(&head, fd))
- ***************
- *** 141,162 ****
- }
- }
-
- ! printf("%s: `fast load' bit was %d is now %d\n", fn,
- (int)((t & F_FASTLOAD) == F_FASTLOAD),
- (int)((head.a_AZero2 & F_FASTLOAD) == F_FASTLOAD));
-
- ! printf("%s: `run in fast ram' bit was %d is now %d\n", fn,
- (int)((t & F_ALTLOAD) == F_ALTLOAD),
- (int)((head.a_AZero2 & F_ALTLOAD) == F_ALTLOAD));
-
- ! printf("%s: `malloc from fast ram' bit was %d is now %d\n", fn,
- (int)((t & F_ALTALLOC) == F_ALTALLOC),
- (int)((head.a_AZero2 & F_ALTALLOC) == F_ALTALLOC));
-
- ! printf("%s: `shared text' bit was %d is now %d\n", fn,
- (int)((t & F_SHTEXT) == F_SHTEXT),
- (int)((head.a_AZero2 & F_SHTEXT) == F_SHTEXT));
-
- return 0;
- }
-
- --- 154,191 ----
- }
- }
-
- ! printf("%s:\n\t `fast load' bit was %d, is now %d.\n", fn,
- (int)((t & F_FASTLOAD) == F_FASTLOAD),
- (int)((head.a_AZero2 & F_FASTLOAD) == F_FASTLOAD));
-
- ! printf("\t `run in fast ram' bit was %d, is now %d.\n",
- (int)((t & F_ALTLOAD) == F_ALTLOAD),
- (int)((head.a_AZero2 & F_ALTLOAD) == F_ALTLOAD));
-
- ! printf("\t`malloc from fast ram' bit was %d, is now %d.\n",
- (int)((t & F_ALTALLOC) == F_ALTALLOC),
- (int)((head.a_AZero2 & F_ALTALLOC) == F_ALTALLOC));
-
- ! printf("\t `shared text' bit was %d, is now %d.\n",
- (int)((t & F_SHTEXT) == F_SHTEXT),
- (int)((head.a_AZero2 & F_SHTEXT) == F_SHTEXT));
-
- + switch (head.a_AZero2 & F_PROTMODE)
- + {
- + case F_PROT_P:
- + ptr = "private";
- + break;
- + case F_PROT_G:
- + ptr = "global";
- + break;
- + case F_PROT_S:
- + ptr = "super";
- + break;
- + case F_PROT_PR:
- + ptr = "private/readable";
- + break;
- + }
- + printf("\truns now with `%s' memory protection.\n", ptr);
- return 0;
- }
-
- ***************
- *** 165,180 ****
- char **argv;
- {
- int fd;
- int status = 0;
- char fn[FILENAME_MAX];
-
- if(argc < 2)
- {
- fprintf(stderr, "usage: toglclr [options] file file .....\n\n");
- ! fprintf(stderr, "options: -fload = toggle `fast load' bit\n");
- ! fprintf(stderr, " -frun = toggle `load program into fast ram' bit\n");
- ! fprintf(stderr, " -fram = toggle `malloc from fast ram' bit\n");
- ! fprintf(stderr, " -fshare= toggle `shared text' bit\n\n");
- fprintf(stderr, "without options the current state is reported.\n");
- exit(1);
- }
- --- 194,216 ----
- char **argv;
- {
- int fd;
- + int tmp = 0;
- int status = 0;
- char fn[FILENAME_MAX];
-
- if(argc < 2)
- {
- fprintf(stderr, "usage: toglclr [options] file file .....\n\n");
- ! fprintf(stderr, "options: -fload = toggle `fast load' bit\n");
- ! fprintf(stderr, " -frun = toggle `load program into fast ram' bit\n");
- ! fprintf(stderr, " -fram = toggle `malloc from fast ram' bit\n");
- ! fprintf(stderr, " -fshare = toggle `shared text' bit\n\n");
- ! fprintf(stderr, "options for memory protection (only one of these allowed and\n");
- ! fprintf(stderr, " only sensible under MultiTOS):\n");
- ! fprintf(stderr, " -private = \n");
- ! fprintf(stderr, " -global = \n");
- ! fprintf(stderr, " -super = \n");
- ! fprintf(stderr, " -readable = \n\n");
- fprintf(stderr, "without options the current state is reported.\n");
- exit(1);
- }
- ***************
- *** 189,196 ****
- --- 225,254 ----
- flags_to_toggle |= F_ALTALLOC;
- if (!strcmp(*argv, "-fshare"))
- flags_to_toggle |= F_SHTEXT;
- + if (!strcmp(*argv, "-private"))
- + {
- + tmp = F_PROT_P;
- + set_mp_flags = 1;
- + }
- + if (!strcmp(*argv, "-global"))
- + {
- + tmp = F_PROT_G;
- + set_mp_flags = 1;
- + }
- + if (!strcmp(*argv, "-super"))
- + {
- + tmp = F_PROT_S;
- + set_mp_flags = 1;
- + }
- + if (!strcmp(*argv, "-readable"))
- + {
- + tmp = F_PROT_PR;
- + set_mp_flags = 1;
- + }
- --argc;
- }
- +
- + flags_to_toggle |= tmp;
-
- while(--argc > 0)
- {
-